package com.saiyaemon.blog.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.saiyaemon.blog.mapper.TagMapper;
import com.saiyaemon.blog.pojo.Tag;
import com.saiyaemon.blog.service.TagService;

/**
 * @author 作者 SaiyaEmon
 * @date 创建时间：2017年11月30日 上午1:18:21
 */
@Service("tagService")
@Transactional
public class TagServiceImpl implements TagService {

	@Autowired
	TagMapper tagMapper;

	@Override
	public Tag selectOne(Tag tag) {
		return tagMapper.selectOne(tag);
	}

	@Override
	public int insert(Tag tag) {
		return tagMapper.insertSelective(tag);
	}

	@Override
	public List<Tag> selectAll() {
		return tagMapper.select(new Tag());
	}

	@Override
	public List<Tag> select(Tag tag) {
		return tagMapper.select(tag);
	}

}
